package com.hy.erp.inventory.pojo;

import java.io.Serializable ;
import java.util.Date ;
import java.util.List;
import java.util.Map;

import javax.persistence.CascadeType ;
import javax.persistence.Column ;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id ;
import javax.persistence.ManyToOne ;
import javax.persistence.NamedQueries ;
import javax.persistence.NamedQuery ;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne ;
import javax.persistence.Table;
import javax.persistence.Temporal ;
import javax.persistence.TemporalType ;

import org.hibernate.annotations.Index ;
/*import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
*/
import com.hy.erp.inventory.dao.interfaces.ISupplierDao;
import com.hy.erp.inventory.pojo.Contact;
import com.hy.erp.inventory.pojo.interfaces.ISupplier;
import com.hy.mydesktop.shared.persistence.domain.gxt.MyBaseModel;
/*import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.api.annotation.DaoA;
import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.entity.AbstractPersistentEntity;
*/
/**
 * <ul>
 * <li>开发作者：汤莉</li>
 * <li>设计日期：2010-10-5；时间：下午03:39:35</li>
 * <li>字段类型：long；字段名称：serialVersionUID</li>
 * <li>设计目的：供应商信息类</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */
/*@ NamedQueries (
            	{
            		@ NamedQuery ( name = "findSupplierByMaterielId" , query = "SELECT"
						+ " materiel.supplier"
						+ " FROM"
						+ " com.pojo.Materiel materiel "
						+ " WHERE "
						+ " materiel.identifier = :materielIdentifier"
						

)    

            
            	} )
@Name("supplier")
@Scope(ScopeType.SESSION)
@DaoA(ISupplierDao.class)*/
//@Entity
//@Table(name="t_suppliers")
//public class Supplier extends AbstractPersistentEntity	implements		ISupplier
public class Supplier extends MyBaseModel //implements IPositonType
{
	private static final long	serialVersionUID	=
													- 1126073850367987563L ;
	

	/**
	 * 构造函数
	 */
	public Supplier(){}
	
	

	//###############################################################################
	
	@Column(name="supplierName",unique=false,nullable=false,insertable=true,updatable=true)
	@Index(name="supplierNameIndex")
	public String getSuppliername ( )
	{
		return this.get(ISupplier.SUPPLIERNAME) ;
	}
	
//	@OneToOne(targetEntity=Address.class,fetch=FetchType.LAZY)
	@Column(name="address",unique=false,nullable=false,insertable=true,updatable=true)
	public String getAddress ( )
	{
		return this.get(ISupplier.ADDRESS) ;
	}
	@Column(name="linkMan",unique=false,nullable=false,insertable=true,updatable=true)
	public String getLinkman ( )
	{
		return this.get(ISupplier.LINKMAN) ;
	}


	@Column(name="postalCode",unique=false,nullable=false,insertable=true,updatable=true)
	public String getPostalcode ( )
	{
		return this.get(ISupplier.POSTALCODE) ;
	}


	@Column(name="factor",unique=false,nullable=false,insertable=true,updatable=true)
	public Boolean isFactor ( )
	{
		return this.get(ISupplier.FACTOR) ;
	}

	@Column(name="properties",unique=false,nullable=false,insertable=true,updatable=true)
	
	public String getOrganizationProperties(){
		return this.get(ISupplier.ORGANIZATIONPROPERTIES) ;
	}

	@Column(name="chengliDate",unique=false,nullable=false,insertable=true,updatable=true)
	@Temporal(TemporalType.DATE)
	public Date getDatetime ( )
	{
		return this.get(ISupplier.DATETIME) ;
	}

	@Column(name="representative",unique=false,nullable=false,insertable=true,updatable=true)
	public String getRepresentative ( )
	{
		return this.get(ISupplier.REPRESENTATIVE) ;
	}

	@Column(name="registercode",unique=false,nullable=false,insertable=true,updatable=true)
	public String getRegistercode ( )
	{
		return this.get(ISupplier.REGISTERCODE) ;
	}

	@Column(name="tariffNumber",unique=false,nullable=false,insertable=true,updatable=true)
	public String getTariffnumber ( )
	{
		return this.get(ISupplier.TARIFFNUMBER) ;
	}

	@Column(name="organizationCodeCertificate",unique=false,nullable=false,insertable=true,updatable=true)
	public String getOrganizationcodecertificate ( )
	{
		return this.get(ISupplier.ORGANIZATIONCODECERTIFICATE) ;
	}


	@OneToOne(targetEntity=Contact.class,fetch=FetchType.LAZY)
	public Contact getContact() {
		return this.get(ISupplier.CONTACT) ;
	}
	
	@ManyToOne(targetEntity=RoleType.class,fetch=FetchType.LAZY)
	public RoleType getRoleType ( )
	{
		return this.get(ISupplier.ROLETYPE) ;
	}
	
	//###################################################################################################
	
	

	public void setRoleType (
								RoleType roleType )
	{
		super.set(ISupplier.ROLETYPE, roleType);
	}


	public void setSuppliername (
									String suppliername )
	{
		super.set(ISupplier.SUPPLIERNAME, suppliername);
	}

	public void setAddress (
								String address )
	{
		super.set(ISupplier.ADDRESS, address);
	}

	public void setLinkman (
								String linkman )
	{
		super.set(ISupplier.LINKMAN, linkman);
	}


	public void setPostalcode (
								String postalcode )
	{
		super.set(ISupplier.POSTALCODE, postalcode);
	}



	public void setFactor (
							Boolean factor )
	{
		super.set(ISupplier.FACTOR, factor);
	}

	public void setOrganizationProperties (
								String properties )
	{
		super.set(ISupplier.ORGANIZATIONPROPERTIES, properties);
	}

	public void setDatetime (
								Date datetime )
	{
		super.set(ISupplier.DATETIME, datetime);
	}

	public void setRepresentative (
									String representative )
	{
		super.set(ISupplier.REPRESENTATIVE, representative);
	}

	public void setRegistercode (
									String registercode )
	{
		super.set(ISupplier.REGISTERCODE, registercode);
	}

	public void setTariffnumber (
									String tariffnumber )
	{
		super.set(ISupplier.TARIFFNUMBER, tariffnumber);
	}

	public void setOrganizationcodecertificate (
													String organizationcodecertificate )
	{
		super.set(ISupplier.ORGANIZATIONCODECERTIFICATE, organizationcodecertificate);
	}

	public void setContact(Contact contact) {
		super.set(ISupplier.CONTACT, contact);
	}
	
	
}
